from appium.webdriver.common.appiumby import AppiumBy
from App.base_page import BasePage


class MainPage(BasePage):

    __BUTTON_SEARCH = (AppiumBy.ID, "com.xueqiu.android:id/search_edittext")
    __INPUT_SEARCH = (AppiumBy.ID, "com.xueqiu.android:id/search_input_text")
    __BUTTON_LISTFIRST = (AppiumBy.XPATH, "//*[@text='取消']/parent::*/following::*[2]/child::*/child::*/child::*[1]")

    __BUTTON_JIJIN = (AppiumBy.XPATH, "//*[@text='基金']")
    __BUTTON_ZSXJ = (AppiumBy.XPATH, "//*[@text='指数选基']")

    def to_jijin(self,):
        self.do_finds(self.__BUTTON_JIJIN)[1].click()

    def to_zsxj(self):
        self.do_click(self.__BUTTON_ZSXJ)



